﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for MailDTO
/// </summary>
public class MailDTO
{   
    private int iDmail;
    private int typeID;
    private string nameSender;

    public string NameSender
    {
        get { return nameSender; }
        set { nameSender = value; }
    }
    public int TypeID
    {
        get { return typeID; }
        set { typeID = value; }
    }
    private string type;
    private string header;
    private string context;
    private DateTime date;
    private bool isInbox;
    private bool check;
    private int acountID;
    private string senderAcountID;

    public string SenderAcountID
    {
        get { return senderAcountID; }
        set { senderAcountID = value; }
    }
    
    private AcountDTO senderAcount;
    public AcountDTO SenderAcount
    {
        get {            
            if(senderAcount == null)
            {
                if (senderAcountID.Equals(""))
                    return null;
                else
                {
                    senderAcount = DBAccess.getAcount(senderAcountID);
                    return senderAcount;
                }
            }
            else
                return senderAcount;
        }
        set { senderAcount = value; }
    }
    public int AcountID
    {
        get { return acountID; }
        set { acountID = value; }
    }  
    public bool Check
    {
      get { return check; }
      set { check = value; }
    }
    public bool IsInbox
    {
      get { return isInbox; }
      set { isInbox = value; }
    }
    public DateTime Date
    {
      get { return date; }
      set { date = value; }
    }
    public string Context
    {
      get { return context; }
      set { context = value; }
    }
    public string Header
    {
      get { return header; }
      set { header = value; }
    }
    public string Type
    {
      get { return type; }
      set { type = value; }
    }
    public int IDmail
    {
      get { return iDmail; }
      set { iDmail = value; }
    }    
	public MailDTO()
	{
        
	}
}